import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:new_yuqib_app/yqbConfig/color_theme.dart';
import 'package:new_yuqib_app/yqbConfig/file_path.dart';
import 'package:url_launcher/url_launcher.dart';

///联系我们
class LianXiView extends StatelessWidget {
  const LianXiView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: const CupertinoNavigationBarBackButton(color: Colors.black),
        title: const Text('联系我们'),
        centerTitle: true,
      ),
      body: ListView(
        padding: const EdgeInsets.symmetric(horizontal: 12),
        children: [
          const SizedBox(height: 16),
          InkWell(
            onTap: (){
              launchUrl(Uri(scheme: "tel",path: "023-63360878"));
            },
            child: Container(
              padding: const EdgeInsets.all(16),
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(6),
              ),
              child: Row(
                children: [
                  Image.asset(FilePath.lxPhonePath, width: 54),
                  const SizedBox(width: 14),
                  const Column(
                    children: [
                      Text(
                        "服务热线",
                        style: TextStyle(
                            color: ColorTheme.primaryTextColor,
                            fontWeight: FontWeight.w500),
                      ),
                      Text(
                        "023-63360878",
                        style: TextStyle(
                            color: ColorTheme.buttonTextColor,
                            fontWeight: FontWeight.w500,
                            fontSize: 16),
                      ),
                    ],
                  )
                ],
              ),
            ),
          ),
          const SizedBox(height: 16),
          InkWell(
            onTap: (){
              launchUrl(Uri.parse("https://www.baidu.com"));
            },
            child: Container(
              padding: const EdgeInsets.all(16),
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(6),
              ),
              child: Row(
                children: [
                  Image.asset(FilePath.lxLinkPath, width: 54),
                  const SizedBox(width: 14),
                  const Column(
                    children: [
                      Text(
                        "官方网站",
                        style: TextStyle(
                            color: ColorTheme.primaryTextColor,
                            fontWeight: FontWeight.w500),
                      ),
                      Text(
                        "www.zhanguo.fun",
                        style: TextStyle(
                            color: ColorTheme.buttonTextColor,
                            fontWeight: FontWeight.w500,
                            fontSize: 16),
                      ),
                    ],
                  )
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
